package com.dlwx.firefighting.adapter;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.dlwx.firefighting.R;
import com.dlwx.firefighting.bean.ShareBean;
import com.dlwx.firefighting.utils.glide.GlideImageLoader;


/**
 * 用户好友列表adapter
 */

public class ShareAdapter extends ListBaseAdapter<ShareBean.ShareLogBean> {

    private GlideImageLoader imageLoader;
    private Context context;

    public ShareAdapter(Context context) {
        super(context);
        imageLoader = new GlideImageLoader(context);
        this.context=context;
    }

    @Override
    public int getLayoutId() {
        return R.layout.user_frienslist_item;
    }

    @Override
    public void onBindItemHolder(SuperViewHolder holder, int position) {
        ShareBean.ShareLogBean bean = mDataList.get(position);
        TextView receNameTv = holder.getView(R.id.rece_name_tv);
        TextView zhuanNameTv = holder.getView(R.id.zhuankuan_name_tv);
        TextView moneyTv = holder.getView(R.id.money_tv);
        TextView timeTv = holder.getView(R.id.time_tv);
        TextView tvState = holder.getView(R.id.tv_state);
        TextView remarkTv = holder.getView(R.id.remark_tv);
        remarkTv.setVisibility(View.GONE);
        tvState.setVisibility(View.GONE);
        receNameTv.setText("id："+bean.getUid());
        zhuanNameTv.setText("时间："+bean.getShare_time());
        moneyTv.setText(context.getString(R.string.rmb)+bean.getShare_money());
        timeTv.setVisibility(View.GONE);
    }

}
